
#ifndef CPUMEMINFO_H
#define CPUMEMINFO_H




class cpuMemInfo
{
public:
    static cpuMemInfo& instance();
    virtual ~cpuMemInfo();

    virtual void init() = 0;

    //cpu平均使用率
    virtual double cpuLoadAverage() = 0;

    // memory
    virtual double usedMemory() = 0;
    virtual double totalMemory() = 0;
    // swap
    virtual double usedSwap();
    virtual double totalSwap();

protected:
    explicit cpuMemInfo();
private:
    cpuMemInfo(const cpuMemInfo& rhs);
    cpuMemInfo& operator=(const cpuMemInfo& rhs);
};

#endif // CPUMEMINFO_H
